package java8_11;

import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class Arr2 {
    public static void main(String[] args) {
        //声明时赋值，必须一步完成
        int[]a2={1,4,44,78,16,14,23,99};
        int []a3=new int[]{1,2,3,4,56,78,910};
        int []a4;
        a4=new int[10];
        //数组长度
        System.out.println(a2.length);
        System.out.println(a3.length);
        Scanner in=new Scanner(System.in);
        System.out.println("请输入数组的值：");
        for(int i=0;i<a4.length;i++){
            a4[i]=in.nextInt();
        }
        System.out.println("您输入的值如下:");
        for(int i=0;i<a4.length;i++){
            System.out.print(a4[i]+" ");
        }
    }
}
